package cn.zhou;

import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入三个整数:");
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int max;
        if (a >=b && a >=c) {
            max = a;
        }else if (b>=a && b>=c) {
            max = b;
        }else{
            max = c;
        }
        System.out.println("三个数的最大数:"+max);
    }
}
//3.计算a,b,c的最大值
        /*//方式一:
        int temp = (a > b) ? a : b;
        int max = (temp > c) ? temp : c;*/

        /*//方式二
        int max;
        if(a>b) {
            max = a;
        } else {
            max = b;
        }
        if (c > max) {
            max = c;
        }*/

        /*//方式三
        int max = a;
        if (b > max) {
            max = b;
        }
        if (c > max) {
            max = c;
        }*/